package com.hzlj.position.locate.service.impl;

import com.hzlj.position.locate.common.model.Position;
import com.hzlj.position.locate.service.AbnGatheringService;
import com.hzlj.position.locate.service.AbnProhibitAreasService;
import com.hzlj.position.locate.service.AbnService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author lifh
 * @date 2023/3/28 10:26
 **/
@Slf4j
@Service
public class AbnServiceImpl implements AbnService {

    @Resource
    private AbnGatheringService abnGatheringService;
    @Resource
    private AbnProhibitAreasService abnProhibitAreasService;

    @Override
    public void syncPositions(List<Position> positions) {
        //同步到缓存中
        abnGatheringService.syncPositions(positions);
        //计算是否进入到禁止区域
        abnProhibitAreasService.syncPositions(positions);
    }
}
